<?php 

$required = array(1 => $this->lang->line('common_no'), 2 => $this->lang->line('common_yes')); 
$inputs = array(1 => 'Text', 2 => 'Checkbox', 3 => 'Radios', 4 => 'Select', 5 => 'Textarea');

?>
<div class="list"><?php 
if (count($configs)) { 
	?><table class="admin"><?php
	?><tr>
		<th><?php echo $this->lang->line('common_id'); ?></th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_name_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_name_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_title_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_title_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_group_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_group_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_values_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_values_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_required_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_required_label'); ?></span>
			</div>
		</th>
		<th colspan="3">
			<div class="shortname">
				<?php echo $this->lang->line('configuration_section_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_section_label'); ?></span>
			</div>
		</th>
		
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_form_control_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_form_control_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_default_value_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_default_value_label'); ?></span>
			</div>
		</th>
		<th>
			<div class="shortname">
				<?php echo $this->lang->line('configuration_order_label_short'); ?>
				<span class="longname"><?php echo $this->lang->line('configuration_order_label'); ?></span>
			</div>
		</th>
	
	</tr><?php
	
	$even = false;
	
	foreach ($configs as $key => $config) {
		$even = !(bool)$even;
		?><tr class="<?php echo ($even ? 'even' : 'odd'); ?>"><td><?php echo $config->cid; ?></td>
		<td><a href="/configuration/add/<?php echo $config->cid; ?>" title="<?php echo $this->lang->line('common_edit'); ?>"><?php echo $config->name; ?></a></td>
		<td><?php echo $config->title; ?></td>
		
		<td><?php echo $config->group_title; ?></td><!-- group_id, group_name -->
		<td><?php echo $config->values; ?></td>
		<td><?php echo $required[$config->required]; ?></td>
		<td><?php echo $config->section; ?></td>
		
		<td><?php echo $config->section_title; ?></td>
		<td><?php echo $config->section_comment; ?></td>
		<td><?php echo $inputs[$config->form_control]; ?></td>
		<td><?php echo $config->default_value; ?></td>
		<td><?php echo $config->order; ?></td></tr><?
	}
	?></table><?php
}

?></div>